<!DOCTYPE html>

<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>请求</title>
        <link rel="stylesheet" href="/bootstrap/css/bootstrap.css">
        <style type="text/css">
            .form {
                width: 50vw ;
                box-shadow: 0 0 5px 4px #dedede;
            }
            .form .col-3 {
                text-align: right ;
            }
        </style>
    </head>
    <body>

        <h1>请求</h1>

        <ul>
            <li> <a href="/parse/request?id=250">parse servlet</a> </li>
            <li>
                <form action="/parse/request" method="get">
                    GET ( parse request )
                	<input type="text" name="username" placeholder="输入用户名">
                	<input type="password" name="password" placeholder="输入密码">
                	<input type="submit" value="提交">
                </form>
            </li>
            <li>
                <!-- enctype 用于规定在向服务器发送表单数据之前如何对其进行编码 (仅适用于 method="post" 情况) -->
                <form action="/parse/request" method="post" enctype="application/x-www-form-urlencoded">
                    POST ( parse request )
                    <input type="text" name="username" placeholder="输入用户名">
                    <input type="password" name="password" placeholder="输入密码">
                    <input type="submit" value="提交">
                </form>
            </li>
            <li>
                <form action="/parse/request" method="post" enctype="text/plain">
                    POST ( parse request )
                    <input type="text" name="username" placeholder="输入用户名">
                    <input type="password" name="password" placeholder="输入密码">
                    <input type="submit" value="提交">
                </form>
            </li>
            <li>
                <form action="/parse/request" method="post" enctype="multipart/form-data">
                    POST ( parse request )
                    <input type="text" name="username" placeholder="输入用户名">
                    <input type="file" name="upload">
                    <input type="submit" value="提交">
                </form>
            </li>
        </ul>

        <hr>

        <div class="form">
            <form action="/sign/up" method="post" enctype="application/x-www-form-urlencoded">
                <div class="row border border-primary">
                    <span class="col-3">用户名:</span>
                    <span class="col-9">
                        <input type="text" name="username" placeholder="请输入用户名">
                    </span>
                </div>
                <div class="row border border-primary">
                    <span class="col-3">密码:</span>
                    <span class="col-9">
                        <input type="password" name="password" placeholder="请输入密码">
                    </span>
                </div>
                <div class="row border border-primary">
                    <span class="col-3">确认密码:</span>
                    <span class="col-9">
                        <input type="password" name="confirm" placeholder="请确认密码">
                    </span>
                </div>
                <div class="row border border-primary">
                    <span class="col-3">性别:</span>
                    <span class="col-9">
                        <input type="radio" name="gender" value="male"> 靓仔
                        <input type="radio" name="gender" value="female"> 靓妹
                    </span>
                </div>
                <div class="row border border-primary">
                    <span class="col-3">爱好:</span>
                    <span class="col-9">
                        <input type="checkbox" name="hobby" value="eat"> 吃
                        <input type="checkbox" name="hobby" value="sleep"> 睡
                        <input type="checkbox" name="hobby" value="eat-ji"> 吃鸡
                    </span>
                </div>
                <div class="row">
                <span class="col-9 offset-3">
                    <button type="submit" >注册</button>
                </span>
            </div>
            </form>
        </div>

        <hr>

        <!-- 用来上传文件的表单 method 必须是 post ，enctype 必须是 multipart/form-data -->
        <form action="/file/upload" method="post" enctype="multipart/form-data">
            <input type="file" name="upfile">
            <button type="submit">上传</button>
        </form>

    </body>
</html>
